package com.ctbri.io;

import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;

public class Ex25 {
	private static final int BSIZE = Integer.MAX_VALUE /2;
	public static void main(String[] args) {
		long start = System.nanoTime();
		ByteBuffer bb = ByteBuffer.allocate(BSIZE);
		double duration = System.nanoTime() - start;
		System.out.format("%.2f\n", duration/1.0e9);
		
		start = System.nanoTime();
		bb = ByteBuffer.allocateDirect(BSIZE);
		duration = System.nanoTime() - start;
		System.out.format("%.2f\n", duration/1.0e9);
	}
}
